#ifndef CMAP_H
#define CMAP_H

#include <string>
#include <vector>
#include <list>

class CGameObject;
class CCharacter;


class CMap
{
public:
	CMap(const std::string& fname);
	~CMap();
	size_t GetWidth() const;
	size_t GetHeight() const;

	CGameObject* GetBlock(size_t x, size_t y);
	void SetBlock(CGameObject* go, size_t x, size_t y);

	std::vector<CGameObject*>& At(size_t x, size_t y);
	CGameObject* At(size_t x, size_t y, size_t z);
	void Shadow(std::vector<char>& shadow, size_t x, size_t y, size_t z);

	bool CouldGetBlock(size_t x, size_t y);
	bool CouldSetBlock(size_t x, size_t y);
private:
	std::vector< std::vector<CGameObject*> > Map;
	std::vector<CCharacter*> Characters;

	size_t Width;
	size_t Height;
};

#endif // CMAP_H
